
# Linux (default)
LIBS = -lglut -lGLU -lGL -lX11 -lm -lpthread -lGLEW
#LIBS = -framework SDL -framework SDL_mixer -framework Cocoa -framework OpenGL -framework GLUT

# Windows (cygwin)
ifeq "$(OS)" "Windows_NT"
    LIBS = = -lopengl32 -lglu32 -lglut32
endif

#echo $(OSTYPE)
#echo 'oi'

# OS X
ifeq "$(OSTYPE)" "darwin9.0"
        LIBS = -framework SDL_mixer -framework SDL -framework Cocoa -framework OpenGL -framework GLUT
endif

INCPATH = -I /usr/include/X11 -I . -I ./includes
LIBPATH = -L/usr/lib -L/usr/lib/X11
CXXFLAGS = -g -Wall
FILES = utils.cpp shape.cpp parallelepiped.cpp sphere.cpp pyramid.cpp tetrahedron.cpp cylinder.cpp cone.cpp collision.cpp drawer.cpp

#g++ Util.cpp Player.cpp Board.cpp Match.cpp BoardTree.cpp BoardGame.cpp Connect4.cpp Tic_Tac_Toe.cpp Main.cpp -o BoardProject

%:%.c
	gcc $(INCPATH) $(LIBPATH) $(FILES) $^ $(LIBS) $(CFLAGS) -o $@

%:%.cpp
	g++ $(INCPATH) $(LIBPATH) $(FILES) $^ $(LIBS) $(CXXFLAGS) -o $@

